export default {
  name: 'co-switch',
  model: {
    prop: 'value',
    event: 'change'
  },
  props: {
    value: Boolean
  },
  render (h) {
    return h('div', {
      staticClass: 'co-switch',
      class: {
        'co-switch--open': this.value
      },
      on: {
        click: () => this.$emit('change', !this.value)
      }
    }, [
      h('div', {
        staticClass: 'co-switch-track'
      }),
      h('div', {
        staticClass: 'co-switch-thumb'
      })
    ]);
  }
};
